Skip to content

Conversation

wx930910
Copy link

@wx930910 wx930910 commented Aug 3, 2021

Fix CAY-2717

Description

Refactor test class DataContextDataChannelEventsIT.java by using Mockito.


Motivation
  • Decoupling test class MockChannelListener from production interface DataChannelListener
  • Making test condition more clear by removing redundant overridden methods and new fields.
  • Use Mockito.verify() to directly verify the behavior of the mocking object and make test condition more explict.

Key changed/added classes in this PR
  • Creating mocking object to replace test subclass MockChannelListener, decoupled test from production code.
  • Replacing assertation statement by using Mockito.verify() to verify the invocation status of graphChanged(GraphEvent), graphFlushed(GraphEvent) and graphRolledback(GraphEvent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant